<template>
  <div>
    <div v-if="show" class="modal-wrap" @click="show = false"></div>
    <div v-if="show" class="modal-contenr-wrap">
      <div class="title">
        测评须知
      </div>
      <div class="content">
        <div>尊敬的参与者：</div>
        <div class="content-1">您好！感谢您抽出宝贵的时间来参与本次问卷调查。本问卷旨在更好地了解老年人的健康状况及需求，为提升老年群体的生活质量提供帮助。您的回答对我们非常重要，所有信息将严格保密，仅用于研究目的。请根据您的真实情况填写，每个问题均没有正确或错误答案。</div>
      </div>
      <div class="btn-wrap">
        <div class="left-btn" @click="show = false">稍后</div>
        <div class="right-btn" @click="handleBtnClick('ok')">开始</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      show: false
    }
  },
  methods: {
    handleBtnClick(type) {
      this.$emit(type)
    }
  }
}
</script>
<style lang="less" scoped>
.modal-wrap {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
}

.modal-contenr-wrap {
  position: absolute;
  width: 345px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 27px;
  box-sizing: border-box;
  border-radius: 10px;
  background: linear-gradient(2deg, #FFF 51.94%, #4BCEE3 97.18%);

  .title {
    color: rgba(0, 0, 0, 0.85);
    text-align: center;
    font-size: 24px;
    font-weight: bold;
  }

  .content {
    color: rgba(0, 0, 0, 0.65);
    font-size: 18px;
    margin-top: 24px;
  }

  .content-1 {
    text-indent: 48px;
    margin-top: 8px;
  }
}

.btn-wrap {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;

  .left-btn {
    width: 135px;
    height: 48px;
    flex-shrink: 0;
    color: #00AFCB;
    border-radius: 48px;
    background: #F6F6F6;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    line-height: 48px;
  }

  .right-btn {
    width: 135px;
    height: 48px;
    flex-shrink: 0;
    color: #fff;
    border-radius: 48px;
    background: linear-gradient(93deg, #00AFCB 19.12%, #1097B4 62.08%);
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    line-height: 48px;
  }
}
</style>